
cmake_minimum_required(VERSION 3.4.1)


file(GLOB allCpp *.cpp)

set(FFMPEG ${CMAKE_SOURCE_DIR}/ffmpeg)
set(RTMP ${CMAKE_SOURCE_DIR}/rtmp)

include_directories(${FFMPEG}/include)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${FFMPEG}/libs/${CMAKE_ANDROID_ARCH_ABI}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${RTMP}/libs/${CMAKE_ANDROID_ARCH_ABI}")

add_library( # Sets the name of the library.
        native-lib
        SHARED
        ${allCpp})


target_link_libraries( # Specifies the target library.
        native-lib


        avformat avcodec avfilter avutil swresample swscale


        log
        z
        rtmp
        android
        OpenSLES
        )